<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>My Project: drogon::HttpFile类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">My Project
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacedrogon.html">drogon</a></li><li class="navelem"><a class="el" href="classdrogon_1_1HttpFile.html">HttpFile</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="classdrogon_1_1HttpFile-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">drogon::HttpFile类 参考</div></div>
</div><!--header-->
<div class="contents">

<p>This class represents a uploaded file by a HTTP request.  
 <a href="classdrogon_1_1HttpFile.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="MultiPart_8h_source.html">MultiPart.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:ad63852f264c84aad514e36c7440d1e8b" id="r_ad63852f264c84aad514e36c7440d1e8b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpFile.html#ad63852f264c84aad514e36c7440d1e8b">HttpFile</a> (std::shared_ptr&lt; HttpFileImpl &gt; &amp;&amp;implPtr) noexcept</td></tr>
<tr class="separator:ad63852f264c84aad514e36c7440d1e8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a8156991a41ae7af14791f853e3ee34" id="r_a1a8156991a41ae7af14791f853e3ee34"><td class="memItemLeft" align="right" valign="top">const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpFile.html#a1a8156991a41ae7af14791f853e3ee34">getFileName</a> () const noexcept</td></tr>
<tr class="memdesc:a1a8156991a41ae7af14791f853e3ee34"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the file name;  <br /></td></tr>
<tr class="separator:a1a8156991a41ae7af14791f853e3ee34"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac70a5a88a54fe1d6e8c54cf3aefafee8" id="r_ac70a5a88a54fe1d6e8c54cf3aefafee8"><td class="memItemLeft" align="right" valign="top">std::string_view&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpFile.html#ac70a5a88a54fe1d6e8c54cf3aefafee8">getFileExtension</a> () const noexcept</td></tr>
<tr class="separator:ac70a5a88a54fe1d6e8c54cf3aefafee8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3952116dcf127fe2c833770829624226" id="r_a3952116dcf127fe2c833770829624226"><td class="memItemLeft" align="right" valign="top">const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpFile.html#a3952116dcf127fe2c833770829624226">getItemName</a> () const noexcept</td></tr>
<tr class="memdesc:a3952116dcf127fe2c833770829624226"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the name of the item in multiple parts.  <br /></td></tr>
<tr class="separator:a3952116dcf127fe2c833770829624226"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5adb3a36157ccf4010c397be742de5ca" id="r_a5adb3a36157ccf4010c397be742de5ca"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacedrogon.html#a968450214a7b7493f6f9eda71082e784">FileType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpFile.html#a5adb3a36157ccf4010c397be742de5ca">getFileType</a> () const noexcept</td></tr>
<tr class="memdesc:a5adb3a36157ccf4010c397be742de5ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the type of file.  <br /></td></tr>
<tr class="separator:a5adb3a36157ccf4010c397be742de5ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7718a356dc1d982125ab7911c41755dc" id="r_a7718a356dc1d982125ab7911c41755dc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpFile.html#a7718a356dc1d982125ab7911c41755dc">setFileName</a> (const std::string &amp;fileName) noexcept</td></tr>
<tr class="memdesc:a7718a356dc1d982125ab7911c41755dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the file name, usually called by the <a class="el" href="classdrogon_1_1MultiPartParser.html">MultiPartParser</a> parser.  <br /></td></tr>
<tr class="separator:a7718a356dc1d982125ab7911c41755dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5498fc58c973ce468fe42046d9a9995b" id="r_a5498fc58c973ce468fe42046d9a9995b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpFile.html#a5498fc58c973ce468fe42046d9a9995b">setFile</a> (const char *data, size_t length) noexcept</td></tr>
<tr class="separator:a5498fc58c973ce468fe42046d9a9995b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c70212d5f8d577ebb938cfd01ff80bc" id="r_a4c70212d5f8d577ebb938cfd01ff80bc"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpFile.html#a4c70212d5f8d577ebb938cfd01ff80bc">save</a> () const noexcept</td></tr>
<tr class="memdesc:a4c70212d5f8d577ebb938cfd01ff80bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Save the file to the file system.  <br /></td></tr>
<tr class="separator:a4c70212d5f8d577ebb938cfd01ff80bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f70e157df386260c1af0baf0b1401ef" id="r_a1f70e157df386260c1af0baf0b1401ef"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpFile.html#a1f70e157df386260c1af0baf0b1401ef">save</a> (const std::string &amp;path) const noexcept</td></tr>
<tr class="memdesc:a1f70e157df386260c1af0baf0b1401ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Save the file to <code>path</code>  <br /></td></tr>
<tr class="separator:a1f70e157df386260c1af0baf0b1401ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e10088b900a4d1c70af9efd0dcebb1f" id="r_a9e10088b900a4d1c70af9efd0dcebb1f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpFile.html#a9e10088b900a4d1c70af9efd0dcebb1f">saveAs</a> (const std::string &amp;fileName) const noexcept</td></tr>
<tr class="memdesc:a9e10088b900a4d1c70af9efd0dcebb1f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Save the file to file system with a new name  <br /></td></tr>
<tr class="separator:a9e10088b900a4d1c70af9efd0dcebb1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2754542c9946865f414b52f902eb0df0" id="r_a2754542c9946865f414b52f902eb0df0"><td class="memItemLeft" align="right" valign="top">std::string_view&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpFile.html#a2754542c9946865f414b52f902eb0df0">fileContent</a> () const noexcept</td></tr>
<tr class="memdesc:a2754542c9946865f414b52f902eb0df0"><td class="mdescLeft">&#160;</td><td class="mdescRight">return the content of the file.  <br /></td></tr>
<tr class="separator:a2754542c9946865f414b52f902eb0df0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7112e33c467820beb4b85c4ae3cf82bd" id="r_a7112e33c467820beb4b85c4ae3cf82bd"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpFile.html#a7112e33c467820beb4b85c4ae3cf82bd">fileLength</a> () const noexcept</td></tr>
<tr class="memdesc:a7112e33c467820beb4b85c4ae3cf82bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the file length.  <br /></td></tr>
<tr class="separator:a7112e33c467820beb4b85c4ae3cf82bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a998ba16beb70bb3037a5f3a9c2938394" id="r_a998ba16beb70bb3037a5f3a9c2938394"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823">drogon::ContentType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpFile.html#a998ba16beb70bb3037a5f3a9c2938394">getContentType</a> () const noexcept</td></tr>
<tr class="memdesc:a998ba16beb70bb3037a5f3a9c2938394"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the content-type of the file.  <br /></td></tr>
<tr class="separator:a998ba16beb70bb3037a5f3a9c2938394"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c01ad896141e1eb07d202464983e223" id="r_a1c01ad896141e1eb07d202464983e223"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpFile.html#a1c01ad896141e1eb07d202464983e223">fileData</a> () const noexcept</td></tr>
<tr class="memdesc:a1c01ad896141e1eb07d202464983e223"><td class="mdescLeft">&#160;</td><td class="mdescRight">return the pointer of the file data.  <br /></td></tr>
<tr class="separator:a1c01ad896141e1eb07d202464983e223"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff73bb0a1bd74c6b150f3b62c4a5119e" id="r_aff73bb0a1bd74c6b150f3b62c4a5119e"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpFile.html#aff73bb0a1bd74c6b150f3b62c4a5119e">getMd5</a> () const noexcept</td></tr>
<tr class="memdesc:aff73bb0a1bd74c6b150f3b62c4a5119e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the md5 string of the file  <br /></td></tr>
<tr class="separator:aff73bb0a1bd74c6b150f3b62c4a5119e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:accc3cf438b66fba359f2d98f1931cf7f" id="r_accc3cf438b66fba359f2d98f1931cf7f"><td class="memItemLeft" align="right" valign="top">const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpFile.html#accc3cf438b66fba359f2d98f1931cf7f">getContentTransferEncoding</a> () const noexcept</td></tr>
<tr class="memdesc:accc3cf438b66fba359f2d98f1931cf7f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the content transfer encoding of the file.  <br /></td></tr>
<tr class="separator:accc3cf438b66fba359f2d98f1931cf7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>This class represents a uploaded file by a HTTP request. </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="ad63852f264c84aad514e36c7440d1e8b" name="ad63852f264c84aad514e36c7440d1e8b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad63852f264c84aad514e36c7440d1e8b">&#9670;&#160;</a></span>HttpFile()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">drogon::HttpFile::HttpFile </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; HttpFileImpl &gt; &amp;&amp;&#160;</td>
          <td class="paramname"><em>implPtr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a2754542c9946865f414b52f902eb0df0" name="a2754542c9946865f414b52f902eb0df0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2754542c9946865f414b52f902eb0df0">&#9670;&#160;</a></span>fileContent()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string_view drogon::HttpFile::fileContent </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>return the content of the file. </p>
<dl class="section return"><dt>返回</dt><dd>std::string_view </dd></dl>

</div>
</div>
<a id="a1c01ad896141e1eb07d202464983e223" name="a1c01ad896141e1eb07d202464983e223"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1c01ad896141e1eb07d202464983e223">&#9670;&#160;</a></span>fileData()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const char * drogon::HttpFile::fileData </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>return the pointer of the file data. </p>
<dl class="section return"><dt>返回</dt><dd>const char* </dd></dl>
<dl class="section note"><dt>注解</dt><dd>This function just returns the beginning of the file data in memory. Users mustn't assume that there is an \0 character at the end of the file data even if the type of the file is text. One should get the length of the file by the <a class="el" href="classdrogon_1_1HttpFile.html#a7112e33c467820beb4b85c4ae3cf82bd" title="Return the file length.">fileLength()</a> method, or use the <a class="el" href="classdrogon_1_1HttpFile.html#a2754542c9946865f414b52f902eb0df0" title="return the content of the file.">fileContent()</a> method. </dd></dl>

</div>
</div>
<a id="a7112e33c467820beb4b85c4ae3cf82bd" name="a7112e33c467820beb4b85c4ae3cf82bd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7112e33c467820beb4b85c4ae3cf82bd">&#9670;&#160;</a></span>fileLength()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">size_t drogon::HttpFile::fileLength </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the file length. </p>

</div>
</div>
<a id="accc3cf438b66fba359f2d98f1931cf7f" name="accc3cf438b66fba359f2d98f1931cf7f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#accc3cf438b66fba359f2d98f1931cf7f">&#9670;&#160;</a></span>getContentTransferEncoding()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const std::string &amp; drogon::HttpFile::getContentTransferEncoding </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the content transfer encoding of the file. </p>

</div>
</div>
<a id="a998ba16beb70bb3037a5f3a9c2938394" name="a998ba16beb70bb3037a5f3a9c2938394"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a998ba16beb70bb3037a5f3a9c2938394">&#9670;&#160;</a></span>getContentType()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823">drogon::ContentType</a> drogon::HttpFile::getContentType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the content-type of the file. </p>

</div>
</div>
<a id="ac70a5a88a54fe1d6e8c54cf3aefafee8" name="ac70a5a88a54fe1d6e8c54cf3aefafee8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac70a5a88a54fe1d6e8c54cf3aefafee8">&#9670;&#160;</a></span>getFileExtension()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string_view drogon::HttpFile::getFileExtension </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Return the file extension; Note: After the <a class="el" href="classdrogon_1_1HttpFile.html" title="This class represents a uploaded file by a HTTP request.">HttpFile</a> object is destroyed, do not use this std::string_view object. </p>

</div>
</div>
<a id="a1a8156991a41ae7af14791f853e3ee34" name="a1a8156991a41ae7af14791f853e3ee34"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1a8156991a41ae7af14791f853e3ee34">&#9670;&#160;</a></span>getFileName()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const std::string &amp; drogon::HttpFile::getFileName </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the file name; </p>

</div>
</div>
<a id="a5adb3a36157ccf4010c397be742de5ca" name="a5adb3a36157ccf4010c397be742de5ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5adb3a36157ccf4010c397be742de5ca">&#9670;&#160;</a></span>getFileType()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespacedrogon.html#a968450214a7b7493f6f9eda71082e784">FileType</a> drogon::HttpFile::getFileType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the type of file. </p>

</div>
</div>
<a id="a3952116dcf127fe2c833770829624226" name="a3952116dcf127fe2c833770829624226"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3952116dcf127fe2c833770829624226">&#9670;&#160;</a></span>getItemName()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const std::string &amp; drogon::HttpFile::getItemName </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the name of the item in multiple parts. </p>

</div>
</div>
<a id="aff73bb0a1bd74c6b150f3b62c4a5119e" name="aff73bb0a1bd74c6b150f3b62c4a5119e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aff73bb0a1bd74c6b150f3b62c4a5119e">&#9670;&#160;</a></span>getMd5()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string drogon::HttpFile::getMd5 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the md5 string of the file </p>

</div>
</div>
<a id="a4c70212d5f8d577ebb938cfd01ff80bc" name="a4c70212d5f8d577ebb938cfd01ff80bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4c70212d5f8d577ebb938cfd01ff80bc">&#9670;&#160;</a></span>save() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int drogon::HttpFile::save </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Save the file to the file system. </p>
<p>The folder saving the file is <a class="el" href="namespacedrogon.html#a0be61eeb45a4c229be4041cd60d0d906" title="A wrapper of the instance() method">app()</a>.getUploadPath(). The full path is <a class="el" href="namespacedrogon.html#a0be61eeb45a4c229be4041cd60d0d906" title="A wrapper of the instance() method">app()</a>.getUploadPath()+"/"+this-&gt;<a class="el" href="classdrogon_1_1HttpFile.html#a1a8156991a41ae7af14791f853e3ee34" title="Return the file name;">getFileName()</a> </p>

</div>
</div>
<a id="a1f70e157df386260c1af0baf0b1401ef" name="a1f70e157df386260c1af0baf0b1401ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1f70e157df386260c1af0baf0b1401ef">&#9670;&#160;</a></span>save() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int drogon::HttpFile::save </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>path</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Save the file to <code>path</code> </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>if the parameter is prefixed with "/", "./" or "../", or is "." or "..", the full path is path+"/"+this-&gt;<a class="el" href="classdrogon_1_1HttpFile.html#a1a8156991a41ae7af14791f853e3ee34" title="Return the file name;">getFileName()</a>, otherwise the file is saved as <a class="el" href="namespacedrogon.html#a0be61eeb45a4c229be4041cd60d0d906" title="A wrapper of the instance() method">app()</a>.getUploadPath()+"/"+path+"/"+this-&gt;<a class="el" href="classdrogon_1_1HttpFile.html#a1a8156991a41ae7af14791f853e3ee34" title="Return the file name;">getFileName()</a> </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a9e10088b900a4d1c70af9efd0dcebb1f" name="a9e10088b900a4d1c70af9efd0dcebb1f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e10088b900a4d1c70af9efd0dcebb1f">&#9670;&#160;</a></span>saveAs()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int drogon::HttpFile::saveAs </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>fileName</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Save the file to file system with a new name </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">fileName</td><td>if the parameter isn't prefixed with "/", "./" or "../", the full path is <a class="el" href="namespacedrogon.html#a0be61eeb45a4c229be4041cd60d0d906" title="A wrapper of the instance() method">app()</a>.getUploadPath()+"/"+filename, otherwise the file is saved as the filename </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a5498fc58c973ce468fe42046d9a9995b" name="a5498fc58c973ce468fe42046d9a9995b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5498fc58c973ce468fe42046d9a9995b">&#9670;&#160;</a></span>setFile()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void drogon::HttpFile::setFile </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set the contents of the file, usually called by the <a class="el" href="classdrogon_1_1MultiPartParser.html">MultiPartParser</a> parser. </p>

</div>
</div>
<a id="a7718a356dc1d982125ab7911c41755dc" name="a7718a356dc1d982125ab7911c41755dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7718a356dc1d982125ab7911c41755dc">&#9670;&#160;</a></span>setFileName()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void drogon::HttpFile::setFileName </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>fileName</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the file name, usually called by the <a class="el" href="classdrogon_1_1MultiPartParser.html">MultiPartParser</a> parser. </p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li><a class="el" href="MultiPart_8h_source.html">MultiPart.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>
